<!--
 * @Author: wangming
 * @Date: 2021-04-21 10:40:46
 * @LastEditors: wangming
 * @LastEditTime: 2022-04-29 11:04:17
 * @Description: file content
-->
<template>
  <el-select :value="value" value-key="value" @change="change">
    <el-option
      v-for="(item, index) in optionsList"
      :key="index"
      :label="item.label"
      :value="item.value"
    >
    </el-option>
  </el-select>
</template>

<script>
import { STAFF_CODE } from "@/utils/enum.js";
export default {
  props: ["value", "tagName"],
  computed: {
    optionsList() {
      if (this.tagName === "hlLayoutForm") {
        return [
          {
            label: "当前用户",
            value: "_U1_",
          },
        ];
      } else {
        return STAFF_CODE;
      }
    },
  },
  methods: {
    async change(id) {
      this.$emit("input", id);
    },
  },
};
</script>

<style lang="scss" scoped></style>
